using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Windows.Forms;
using IE = Dimok.IE;

namespace Manheim {
	public class Server {
		private static Manheim.ManheimForm form = new Manheim.ManheimForm();
		
		[STAThread]static void Main(){
			ManheimServer.Form = form;
			try{
				RemotingConfiguration.Configure(AppDomain.CurrentDomain.FriendlyName+".config",false);
				RemotingConfiguration.RegisterWellKnownServiceType(typeof(ManheimServer),Dimok.Config.Manheim.URL, WellKnownObjectMode.Singleton);
			}catch(Exception exc){
				form.Error = exc;
			}
			Application.Run(form);
		}
	}
}
